﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="myorderlist.aspx.cs" Inherits="Html5.shopmyorderlist" %>


<%@ Register Src="~/footer.ascx" TagName="Foot" TagPrefix="uc2" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <title><%= SectionProxyData.GetSetValue(3) %></title>

    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <link type="text/css" rel="stylesheet" href="/css/page.css" />
     <link href="../css/shopcenter.css" rel="stylesheet" />
    <script type="text/javascript" src="/javascript/jquery.js"></script>

    <style type="text/css">
        .bom_menu .icon-order {
            background-image: url(/images/ico_b_order_cur.png);
        }

         #page_title .top_shop {
            background: url(/images/shop_top_search.png) no-repeat;
            height: 32px;
            width: 32px;
            background-size: 100% 100%;
            margin-top: 5px;
        }
    </style>


</head>
<body>
    <div class="page">

        <div id="page_title">
            <a href="index.aspx" id="back" class=" top_left" data-ajax="false"><span style="padding-left:15px; width:50px; position:absolute;top:-10px; font-size:14px; ">返回</span></a>
            <h1>订单管理</h1>
            <a id="togourl" class="top_shop top_right" href="javascript:" onclick="$('#searchbox').toggle()"></a>
        </div>

        <div class="container ">

             <div id="searchbox" style="display:none;">

                <ul class="my_order_list">
                    <li>
                        <div class="order-tit">
                            <span class="time"><strong>单号/电话</strong>
                                <input name="tbuserName" type="text" runat="server" id="tbkey" class="w_txt" placeholder="请输入单号或者手机号" />
                            </span>
                        </div>

                        <div class="order-tit" style="border-bottom: none; padding: 0;">
                            <span class="time"><strong>订单状态</strong>
                                <select id="ddlstate" runat="server"></select>
                            </span>
                        </div>


                    </li>
                </ul>

                <div class="order-tit">
                    <div class="view_back_con">
                        <input type="submit" value="搜索" onclick="searchorder()" class="view_back_btn" data-ajax="false" />
                    </div>
                </div>
            </div>


            <ul class="my_order_list">
                <asp:Repeater runat="server" ID="rptorder">
                    <ItemTemplate>
                        <li>
                            <a href="showtogoorder.aspx?id=<%# Eval("orderid") %>" data-ajax="false">
                                <div class="order-tit">
                                    <span class="time"><%# Eval("OrderDateTime")%></span>
                                    <span class="state"><%# WebUtility.TurnOrderState(Eval("OrderStatus")) %></span>
                                </div>
                                <div class="order-info">
                                    <p class="f14">订单编号：<span class="red"><%# Eval("orderid") %></span></p>
                                    <p class="grey">总金额：￥<%# Eval("OrderSums")%></p>
                                    <p class="grey">配送费：￥<%# Eval("shopdiscountmoney")%></p>
                                </div>
                            </a>
                        </li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>

            <div class="con-btn" id="pages" runat="server" style="display: ;">
            </div>
        </div>
    </div>
</body>
</html>


<script type="text/javascript">
    function payagain(target) {
        var orderid = $(target).attr("data-orderid");
        var price = $(target).attr("data-price");
        window.location = "/weixinpay/wxpay.aspx?orderid=" + orderid + "&price=" + price;
        return false;
    }

    function orderdetail(orderid, ReveInt2) {
        if (parseInt(ReveInt2) == 50) {
            window.location = "lifeshowtogoorder.aspx?id=" + orderid;
        } else {
            window.location = "showtogoorder.aspx?id=" + orderid;
        }
    }
</script>


<script src="../javascript/jCommon.js"></script>

<script type="text/javascript">

    function searchorder() {
        var url = "myorderlist.aspx?a=1";
        var tbkey = $.trim($("#tbkey").val());
        if (tbkey.length > 0) {
            url += "&key=" + tbkey;
        }

        var ddlstate = $.trim($("#ddlstate").val());
        if (ddlstate != "-1") {
            url += "&state=" + ddlstate;
        }

        window.location = url;

    }

    $(document).ready(function () {
        var tbkey = request("key")
        if (tbkey.length > 0) {
            $("#tbkey").val(tbkey);
            $("#searchbox").show();
        }
        var state = request("state")
        if (state.length > 0) {
            $("#ddlstate").val(state);
            $("#searchbox").show();
        }

    });



</script>